/**
 * Created by YIJIEDAO2 on 2017/5/30.
 */
import React from 'react';
import { Router, Route, hashHistory, Redirect } from 'react-router';

//框架页面
import Layout from '../container/Layout/layout';

//机器管理
import MachineList from '../pages/Machine_Nav/machineList';
import AfterBuy from '../pages/Machine_Nav/afterBuy';
import OperateList from '../pages/Machine_Nav/operateList';
import Price from '../pages/Machine_Nav/price';
import CostList from '../pages/Machine_Nav/costList';
import Coupon from '../container/Machine_Nav/coupon';
import Feedback from '../pages/Machine_Nav/feedback';
import PowerOff from '../pages/Machine_Nav/powerOff';

//商品管理
import GoodList from '../pages/Goods_Nav/goodList';
import MyGood from '../pages/Goods_Nav/myGood';

//菜单管理
import Menu from '../container/Menu_Nav/menu';

const RouteConfig = (
  <Router history={hashHistory}>

    <Route path="" component={Layout}>

      {/*{ 机器管理 }*/}
      <Route path="/machineList" component={MachineList} />
      <Route path="/afterBuy" component={AfterBuy} />
      <Route path="/operateList" component={OperateList} />
      <Route path="/price" component={Price} />
      <Route path="/costList" component={CostList} />
      <Route path="/coupon" component={Coupon} />
      <Route path="/feedback" component={Feedback} />
      <Route path="/powerOff" component={PowerOff} />

      {/*{ 商品管理 }*/}
      <Route path="/goodList" component={GoodList} />
      <Route path="/myGood" component={MyGood} />

      {/*{ 菜单管理 }*/}
      <Route path="/menuConfig" component={Menu} />

      <Redirect from='*' to='/costList'/>

    </Route>

  </Router>
);

export default RouteConfig


